package org.abac4j.util;

import java.lang.reflect.Method;

import org.abac4j.annotations.AttributeFunction;

public class AttributeFunctionUtil {
	
	public static String getFunctionName(Method method) {
		AttributeFunction annotation = method.getAnnotation(AttributeFunction.class);
		String name = method.getName();
		if(!annotation.value().equals("")){
			name = annotation.value();
		}
		return name;
	}
}
